<?php
class Foxsis_Form_Pagamento extends Zend_Form
{
    public function init()
    {
    	$view = $this->getView();
        $this->setAction($view->url(array('controller' => 'pagamento', 'action' => 'save'), 'default', 'true'));
        
        $this->setMethod('POST');

        $this->setName("FormPagamento");
		
        $id_pagamento = new Zend_Form_Element_Hidden('id_pagamento');
        $id_pagamento->removeDecorator('HtmlTag')->removeDecorator('Label')
        		   ->addFilter('Int');
        		   
        $id_dominio = new Zend_Form_Element_Select('id_dominio');
        $id_dominio->setLabel('Dominio:');
        
        $id_usuario = new Zend_Form_Element_Hidden('id_usuario');
        $id_usuario->removeDecorator('HtmlTag')
                   ->removeDecorator('Label')
                   ->setValue(Zend_Auth::getInstance()->getIdentity()->id_usuario)
                   ->addFilter('Int');
                
        $referente = new Zend_Form_Element_Text('referente');
        $referente->setLabel('Referente:')
        		   ->setRequired(true)
                   ->addFilter('StripTags')
                   ->addFilter('StringTrim')
                   ->addValidator('NotEmpty')
                   ->setAttribs(
                 	  array(
                 		  "size" => "15",
                 		  "maxlenght" => 10,
                 		  "rel"	=> "Informe a data do mes referente."
                 	 )
                 );
                 
        	   
        $this->addElements(
            array($id_pagamento, $id_dominio, $id_usuario, $referente)
        );
        
        
    }
}